package com.unisyou.entity;

public class PersonEntity implements Cloneable{

    private String firstName;

    private String lastName;

    private int age;

    public PersonEntity() {
    }

    public PersonEntity(String firstName, String lastName, int age) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.age = age;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "PersonEntity{" +
                "firstName='" + firstName + '\'' +
                ", lastName='" + lastName + '\'' +
                ", age=" + age +
                '}';
    }

    public static void main(String[] args) {
        PersonEntity personEntity = new PersonEntity();
        try {
            PersonEntity personEntity1 = (PersonEntity) personEntity.clone();
            System.out.println(personEntity == personEntity1);
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
    }
}
